class Rectangle:
    def __init__(self,x,y):
        self.x = x
        self.y = y
    def getarea(self):
        return self.x * self.y
###以长4宽3的长方形为例
test = Rectangle(3,4)
print(test.getarea())

